<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>商品购买</title>
  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="js/jquery-3.5.1.min.js"></script>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  <script src="js/bootstrap.min.js"></script>

  <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  <script src="js/del.js"></script>


</head>
<body>
<div th:insert="user/navigate::nav"></div>

<div class="panel panel-default" style="margin-top: -20px;">
  <div class="comtent_1">


    <div class="row">
      <div class="col-sm-12">
        <div class="panel panel-default">

          <div class="panel-body">
            <table class="table table-striped table-hover table-responsive" >
              <thead>

              <tr>
                <th >编号</th>
                <th>名称</th>
                <th>单价</th>
                <th>数量</th>
                <th>剩余</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody>
              <form action="/buyGood" method="post">
              <tr th:each="goodManage:${goodManages}">
                <th th:text="${goodManage.goodsId}">1</th>
                <th th:text="${goodManage.goodsName}">泡面</th>
                <th th:text="${goodManage.goodsPrice}">4.5</th>
                <th >
                  <select name="number">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                  </select>


                </th>
                <th th:text="${goodManage.goodsNumber}">10</th>

                <td>
                  <button type="submit" class="btn btn-danger" th:value="${goodManage.goodsId}" name="id">购买</button>
                </td>
              </tr>
              </form>
              </tbody>
            </table>
          </div>

          <!--                    <div class="modal fade" id="login-modal">-->
          <!--                        <div class="modal-dialog">-->
          <!--                            <div class="modal-content">-->
          <!--                                <div class="modal-header">-->
          <!--                                    <button class="close">&times;</button>-->
          <!--                                    <h4>修改</h4>-->
          <!--                                </div>-->
          <!--                                <div class="modal-body" >-->
          <!--                                    <p>修改的表单</p>-->
          <!--                                </div>-->
          <!--                                <div class="modal-footer">-->
          <!--                                    <button class="btn btn-primary">保存</button>-->
          <!--                                </div>-->
          <!--                            </div>-->
          <!--                        </div>-->
          <!--                    </div>-->

        </div>
      </div>
    </div>
  </div>

</div>

</body>
</html>